package com.lcy.demo;

import java.rmi.AlreadyBoundException;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;

/**
 * Created by 娄存银 on 2017/4/6.
 */
public class Server {
    public static void main(String[] args){
        try {
            Registry registry = LocateRegistry.createRegistry(20036);
            RemoteServiceImpl service = new RemoteServiceImpl();
            registry.bind("demoService",service);
        } catch (RemoteException | AlreadyBoundException e) {
            e.printStackTrace();
        }
    }
}
